home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / GMSMTH01.ZIP / INCLUDE / XTEXT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-02  |  2.8 KB  |  93 lines

  1. /*-----------------------------------------------------------------------
  2. ;
  3. ; XTEXT - header file
  4. ;
  5. ;
  6. ;
  7. ; ****** XLIB - Mode X graphics library                ****************
  8. ; ******                                               ****************
  9. ; ****** Written By Themie Gouthas                     ****************
  10. ;
  11. ; egg@dstos3.dsto.gov.au
  12. ; teg@bart.dsto.gov.au
  13. ;
  14. ;  Terminology & notes:
  15. ;         VRAM ==   Video RAM
  16. ;         SRAM ==   System RAM
  17. ;         X coordinates are in pixels unless explicitly stated
  18. ;
  19. ;-----------------------------------------------------------------------*/
  20.  
  21. #ifndef _XTEXT_H_
  22. #define _XTEXT_H_
  23.  
  24. #include <g_def.h>
  25.  
  26. #define FONT_8x8  0
  27. #define FONT_8x15 1
  28. #define FONT_USER 2
  29.  
  30. /* FUNCTIONS =========================================================== */
  31.  
  32. extern WORD x_text_init(void);            /* Initialize text functionns  */
  33.  
  34. extern void x_set_font(
  35.         WORD FontId);             /* Set the font style          */
  36.  
  37. extern void x_register_userfont(          /* register a user defined font */
  38.         char far *UserFontPtr);
  39.  
  40.  
  41. extern USHORT  x_char_put(          /* Draw a text character using  */
  42.         char ch,                  /* the currently active font    */
  43.         WORD X,
  44.         WORD Y,
  45.         WORD PgOffs,
  46.         WORD Color);
  47.  
  48.  
  49. extern USHORT  x_get_char_width(    /* Get the character width      */
  50.         char ch);
  51.  
  52.  
  53. /* the folowing function is from xprintf.c but is included due to its     */
  54. /* close relationship with this module                                    */
  55.  
  56. void x_printf(                          /* formatted text output */
  57.            WORD x,
  58.            WORD y,
  59.            WORD ScrnOffs,
  60.            WORD color,
  61.            char *ln,...);
  62.  
  63. void x_bgprintf(                          /* formatted text output */
  64.            WORD x,
  65.            WORD y,
  66.            WORD ScrnOffs,
  67.            WORD fgcolor,
  68.            WORD bgcolor,
  69.            char *ln,...);
  70.  
  71.  
  72. short x_strlen(char *s);
  73. void xfputs(WORD x, WORD y, WORD ScrnOffs,WORD color,char far *ln);
  74. void xputs(WORD x, WORD y, WORD ScrnOffs,WORD color,char *ln);
  75. void xbput(WORD x, WORD y, WORD ScrnOffs,WORD color, WORD b_color, char *ln);
  76. void xfbput(WORD x, WORD y, WORD ScrnOffs,WORD color, WORD b_color,
  77.             char far *ln);
  78.  
  79. /* VARIABLES =========================================================== */
  80.  
  81. extern BYTE CharHeight;     /* Char height of currently active font        */
  82. extern BYTE CharWidth;      /* Char width of currently active font         */
  83. extern BYTE FirstChar;      /* First char in the curr. active font         */
  84.  
  85. extern BYTE UserCharHeight; /* Char height of currentle regist'd user font */
  86. extern BYTE UserCharWidth;  /* Char height of currentle regist'd user font */
  87. extern BYTE UserFirstChar;  /* First char of the curr. regist'd usera font */
  88.  
  89.  
  90. #endif
  91.  
  92.  
  93.